package com.wyh.service.feemanagementservice;

import com.baomidou.mybatisplus.extension.service.IService;
import com.wyh.domain.dto.feemanagementdto.*;
import com.wyh.domain.po.feemanagementpo.Billes;
import com.wyh.domain.po.feemanagementpo.Invoicerecordes;
import com.wyh.domain.vo.feemanagementvo.*;
import org.springframework.scheduling.annotation.Scheduled;

import java.util.List;

public interface BillService extends IService<Billes>{

    //查询欠费账单列表
    public BillsVO selectAllBills(String account, BilDTO bilDTO);

    //查询未欠费账单列表
    public BillssVO selectAllBill(String account, BilDTO bilDTO);

    public List<BDTO> selectBasic(BillStatusDTO billStatusDTO);

    public List<BiDetailsDTO> selectBill(BillStatusDTO billStatusDTO);

    public List<BillDetailsDTO> selectBillDetails(BillStatusDTO billStatusDTO);

    //修改账单催收状态
    public void updateBill(Integer id);

    //刷新滞纳金
    @Scheduled(cron = "0 0 1 * * ?")   //每天凌晨一点刷新滞纳金
    public void updateLaggold();

    public void updateTotalArrears();   //更新总欠费金额




    List<ReceivablesVO> getBillByCustomerId(Integer customerId);

    Invoicerecordes getInvoicerecordsByBillid(Integer billid);

    //根据资源id查询对应账单
    List<Billes> getBillByResourceId(Integer resourceId);

    com.baomidou.mybatisplus.extension.plugins.pagination.Page<PaymentHistoryVO> getPayHistoryByResourceIdPage(Integer resourceid, Integer page, Integer size);

    //用于导入时，增加账单信息
    int insertB(Billes billes);
    Billes findByPayee(String payee);

    void update(Billes billes);

    List<Billes> findUnpaidBillsByCustomerId(int customerid);


    Integer isBillOverdue(List<Integer> customerIds);

    void startChargeConfirm(CostSummaryVO costSummaryVO, Integer customerId, Integer PaymentMethod, Integer useid);
}
